package com.serkol.ams.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.serkol.ams.entity.AgentInvitationRelationship;
import com.serkol.ams.entity.OrderDetail;
import com.serkol.ams.entity.OrderMaster;
import com.serkol.exception.AuthException;

import java.util.List;
import java.util.Map;

/**
* @author pingan
* @description 针对表【agent_invitation_relationship】的数据库操作Service
* @createDate 2022-09-23 12:31:50
*/
public interface AgentInvitationRelationshipService extends IService<AgentInvitationRelationship> {

    boolean getInvitationRelationship(OrderMaster order, long agentId) throws AuthException;

    boolean getCreateInvitationRelationship(OrderMaster order) throws AuthException;
    List<Long>  findByGoodsIds(long agentId);

    boolean getCreateInvitationRelationshipOne(List<OrderDetail> goodsByList, List<OrderDetail> goodsByList1) throws AuthException;



    boolean valid(AgentInvitationRelationship agent);
    AgentInvitationRelationship   getAgentInfo(long agentId, long relationAgentId, Integer isActivty, int type);

    AgentInvitationRelationship findByAgentInValidConfig(long agentId);

    AgentInvitationRelationship getAgentUpgradeInfo(Long parentAgentId, Long agentId, long agentId1, Integer isActivty, int type);

    List<Map<String, Object>> findByList(int state, boolean isActivty);
    List<Map<String, Object>> findByCategoryIdList(long categoryId, int state, boolean isActivty);

    AgentInvitationRelationship getAgentInfoImpl(Long agentId, Long agentId1, Integer isActivty, Long goodsId,int type);


}
